<template>
    <sky-base-page ref="skyBasePageRef" :api-obj="qly.api.user.information.index" type="list" refresherEnabled
                   bg-page-color="#f5f5f5">
        <template #header>
            <view class="search-box">
                <up-search placeholder="请输入动态名称" v-model="form.keyword"></up-search>
            </view>
        </template>
        <template #default="{dataList}">
            <sky-dynamic v-for="(item,index) in dataList" :key="index" :item="item" @success="success"  @operation="operation"/>
        </template>
    </sky-base-page>
    
    <!--    操作弹窗-->
    <sky-operation ref="operationPopupRef" @success="success"/>
</template>
<script setup>
const form = ref({
    keyword: ''
})
const skyBasePageRef = ref()
const operationPopupRef = ref()

const success = () => {
    skyBasePageRef.value.refresh()
}

const operation = (e) => {
    operationPopupRef.value.open(e)
}
onLoad(() => {
    uni.$on('reload', () => {
        skyBasePageRef.value.refresh()
    })
})
</script>
<style scoped lang="scss">
.search-box {
    padding: 24rpx;
    box-sizing: border-box;
    background-color: #fff;
}
</style>
